<template>
  <div class="panel">
    <div class="preview-box">
      <h5>Navigation</h5>
      <Preview />
    </div>
    <ul class="change-view-btns">
      <li @click="setScale(.1)"><img src="../assets/icon/big.png" alt=""></li>
      <li @click="setScale(-.1)"><img src="../assets/icon/small.png" alt=""></li>
    </ul>
    <PixelSize />
    <Colors />
    <InfoBox />
  </div>
</template>

<script>
import Preview from "./Preview.vue"
import Colors from "./Colors.vue"
import PixelSize from "./PixelSize.vue"
import InfoBox from "./InfoBox.vue"
export default {
  components:{
    Colors,
    Preview,
    PixelSize,
    InfoBox
  },
  data() {
    return {
      preview: ""
    };
  },
  created() {
    
  },
  mounted() {},
  methods: {
    setScale(n) {
      this.$bus.$emit("scale", {
        type: "change",
        n
      });
    }
  }
};
</script>

<style scoped lang="scss">
.change-view-btns{
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
  height: 30px;
  background-color: #525252;
  box-sizing: border-box;
  border-top: 1px solid #3f3f3f;
  border-bottom: 1px solid #3f3f3f;
  li{
    flex: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    img{
      height: 80%;
    }
    &:hover{
      background-color: rgba(0,0,0,.2);
    }
  }
}
.panel {
  width: 180px;
  height: 100%;
  overflow-y: auto;
  background-color: #666;
  align-items: center;
  position: relative;
  z-index: 99;
  margin-left: auto;
  box-sizing: border-box;
  &::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background: #ededed;
  }
  &::-webkit-scrollbar-thumb {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    background: #535353;
  }
  &::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    background: #ededed;
  }
}
.preview-box {
  width: 100%;
  height: auto;
  position: relative;
  box-sizing: border-box;
  background: #555;
  padding-bottom: 15px;
  h5 {
    padding: 10px 0;
    width: 100%;
    color: #fff;
    text-transform: uppercase;
    font-size: 10px;
    text-align: center;
    position: relative;
    max-height: 35px;
    overflow: hidden;
    font-family: "Oswald";
    box-sizing: border-box;
  }
  div {
    width: 140px;
    height: auto;
    margin: 0 auto;
    position: relative;
    img {
      width: 100%;
      height: auto;
      vertical-align:middle;
      user-select: none;
      cursor: default;
      pointer-events: none;
    }
  }
}
</style>
